import {ref} from 'vue';
import axios from 'axios';
export const signData=()=>
{
    const userName = ref('');
    const password = ref('');
    const mobile = ref('');
    const register = () => {
        const data = {
          userName: userName.value,
          password: password.value,
          mobile: mobile .value,
        };
      
        axios.post('http://127.0.0.1:8888/register/page', data)
          .then(response => {
            console.log(response.data);
          })
          .catch(error => {
            console.error(error);
          });
          alert("注册成功！");
      };
      return{userName,password,mobile,register}
}